pub fn make_hearbeat_message() -> Vec<u8> {
    let mut msg_buffer = Vec::with_capacity(6);

    unsafe {
        msg_buffer.set_len(6);

        let len: u32 = 6;

        let len_bytes = len.to_le_bytes();

        let len_ptr = msg_buffer.as_mut_ptr();

        std::ptr::copy_nonoverlapping(len_bytes.as_ptr(), len_ptr, 4);
        //
        let msg_type: u16 = 0;

        let type_bytes = msg_type.to_le_bytes();

        let type_ptr = msg_buffer.as_mut_ptr().offset(4);

        std::ptr::copy_nonoverlapping(type_bytes.as_ptr(), type_ptr, 2);
    }
    msg_buffer
}
